<h1>Editer chasse</h1>
<div class="span3 bs-docs-sidebar">
	<ul class="nav nav-list">
		<li class="nav-header">Mes chasses aux tr&eacute;sors</li>
		<li><a href="#">Cr&eacute;er</a></li>
		<li><a href="#">Lister</a></li>
	</ul>
</div>
<div class="span9">
	<section id=Cr&eacute;er>
		<form method="post" action="">
			<div id="accordion">
				<a>Description<br /></a>
				<div>
					<table class="table table-striped table-bordered">
						<tr>
							<td>Nom</td>
							<td><input type="text" id="nom" /></td>
						</tr>
						<tr>
							<td>Tags</td>
							<td><input type="text" id="tags" /></td>
						</tr>
						<tr>
							<td>Description</td>
							<td><textarea id="description"></textarea></td>
						</tr>
						<tr>
							<td>Durée</td>
							<td><input type="text" id="jours" style="width: 50px;"
								value="%tags%" />&nbsp;&nbsp;j&nbsp;&nbsp; <input type="text"
								id="heures" style="width: 50px;" value="%heures%" />&nbsp;&nbsp;h&nbsp;&nbsp;
								<input type="text" id="minutes" style="width: 50px;"
								value="%minutes%" />&nbsp;&nbsp;m</td>
						</tr>
					</table>
				</div>
				<div id="enigmes">
			

					<!--<a>Enigme 1<br /></a>

					<div>
						<p id="enigme1"></p>
					</div>-->
                    
				</div>
                <h1>Ajouter Etape</h1>
                <!--[{"enigme":"enigme","reponse":"une rï¿½ponse","commentaire":"un commentaire","indices":["indice1","indice2"]}]-->
                <h3>Intitulé de l'énigme</h3>
                <input type="text" id="intitule" style="width: 200px;" value="" />
                <h3>Réponse</h3>
                <input type="text" id="reponse" style="width: 200px;" value="" />
                <h3>Commentaire</h3>
                <input type="text" id="commentaire" style="width: 200px;" value="" />
                <h3>Indice</h3>
                <input type="text" id="indice" style="width: 200px;" value="" />
                <input type="submit" id="prout" value="Ajouter l'étape"/>
			</div>
            <input type="submit" id="prout" value="Enregistrer la chasse"/>
		</form>
		<script>
			jQuery('#accordion').accordion();
		</script>
	</section>
</div>

<script type="text/javascript" src="script/jquery.js"></script>
<script type="text/javascript">
	var data = {
		"etapes" : [ {
			"enigme" : "enigme",
			"reponse" : "une réponse",
			"commentaire" : "un commentaire",
			"indices" : [ "indice1", "indice2" ]
		} ],
		"duree" : {
			"jours" : 0,
			"heures" : 0,
			"minutes" : 0
		},
		"nom" : "unNom",
		"description" : "Unedescription"
	};
	$("#nom").attr("value", data.nom);
	$("#description").text(data.description);
	$("#heures").attr("value", data.heures);
	$("#jours").attr("value", data.jours);
	$("#minutes").attr("value", data.minutes);
	
	for(var enigme in data.etapes){
		$("#enigmes").prepend($("p").text(enigme.enigme/*+"<br/>"+enigme.reponse+"<br/>"+enigme.commentaire+"<br/>"+enigme.indice*/);
	}

	$("#enigme1").text(data.nom);
</script>
